package com.iweb.day12;

/**
 * @author WuYongheng
 * @date 2021/12/5
 * @description 体验优先级
 */
public class TestPriority extends Thread{
    @Override
    public void run() {
        System.out.println(Thread.currentThread().getName()
                +"正在运行！");
    }

    public static void main(String[] args) {
        TestPriority t1=new TestPriority();
        TestPriority t2=new TestPriority();
        t1.setName("t1");
        t1.setPriority(1);
        t2.setName("t2");
        t2.setPriority(10);
        System.out.println(t1.getPriority());
        System.out.println(t2.getPriority());
        t1.start();
        t2.start();
    }
}
